Conventional computer systems are widely used to display three-dimensional graphical images. For example, FIG. 1 depicts a display 10 for a conventional computer system. The display 10 is typically a LCD. The display 10 include a plurality of pixels, one of which is depicted as pixel 20. The display 10 is used for providing graphical images to users. Typically, objects in the graphical image are broken into primitives, typically triangles. Four primitives 12, 14, 16 and 18 are depicted in FIG. 1. Primitives may stand alone, may be adjacent, such as the primitives 12 and 14, or may intersect, such as the primitives 16 and 18.
Each of the primitives 12, 14, 16 and 18 intersects one or more pixels 20. The data for a primitive intersecting a particular pixel will be termed a fragment. Thus, each fragment corresponds to a particular pixel and a particular primitive, or object. The fragment typically includes, but is not limited to, color data, α-blending data, texture data, the z-value (distance from the viewing plane) and x and y coordinate values (position across the display screen). The texture data for a fragment typically includes one or more textures which are to be displayed. In order to display the graphical image, data for each fragment intersecting each pixel 20 is processed, then displayed on the pixels 20. The texture can be thought of as another color that is typically derived from a texture map. In most conventional systems, texture from the texture map and primitive's color are blended together to obtain a final color value for the fragment. Thus, at least both the color and the texture data for each fragment are processed in order to display the graphical image.
Multum in parvo (MIP) maps often are used for texture processing. Using MIP maps for texture mapping, an object's (or primitive's) size and distance from the viewing plane can be accounted for. Each MIP map contains data for a texture on several levels. Each level of the MIP map contains data for the texture at a different resolution. For example, the first MIP map level may contain the texture at a first, fill resolution. The second MIP map level contains a lower resolution version of the texture. Higher MIP map levels contain lower resolution versions of the texture. The second MIP map level is thus at one-half of the resolution of the first MIP map level. The third MIP map level typically contains a version of the texture at one-fourth the resolution of the first MIP map level.
In order to use the MIP map, the appropriate MIP map level for each fragment is selected. The texture for this MIP map level can then be used in texture mapping for the fragment being rendered. In some conventional methods, the MIP map level is selected using a ratio which depends upon a conventional display area and a conventional texture area. The display area is the area occupied on the display 10 (display space) by a primitive 12, 14, 16, or 18 or a portion of the primitive 12, 14, 16, or 18, such as a pixel 20. The conventional texture area is the corresponding area in the texture (texture space). The conventional display area divided by the conventional texture area provides a ratio which is used to select a MIP map level and, in some conventional systems, interpolate between MIP map levels.
Once the final color value, using the color data and texture data of a fragment, is obtained, the fragment can be displayed on a pixel 20. To be capable of displaying different colors, each pixel 20 typically has multiple display elements of different colors. Typically, there are three display elements per pixel 20. These display elements typically are red, green and blue. Just as each pixel 20 has a size and location on the display 10, the display elements within a pixel have a physical size and location within the pixel 20.
The display elements may also be configured differently. For example, FIGS. 2A, 2B and 2C depict different configurations for display elements. FIG. 2A depicts a two pixel by two pixel portion of the display 10 having four pixels 20′. Each of the pixels 20′ includes display elements 22, 24 and 26. The display element 22 is red. The display element 24 is green, and the display 26 is blue. The pixels 20′ are thus arranged in an array such that the display elements 22, 24 and 26 always alternate colors red, green, then blue in each row. FIG. 2B depicts a two pixel by two pixel portion of the display 10 having four pixels 20″. Each of the pixels 20″ also includes display elements 22, 24 and 26. The pixels 20″ are thus arranged in an array such that the display elements 22, 24 and 26 always alternate colors red, green, then blue in each column. FIG. 2C depicts a two pixel by two pixel portion of the display 10 having four pixels 20′″. Each of the pixels 20′″ includes display elements 22, 24 and 26. The pixels 20′″ are thus arranged in an array such that the display elements 22, 24 and 26 alternate colors red, green, then blue in one row. In the next row of pixels 20′″, the display element 26 is first, followed by the display elements 24 and 22, respectively. In addition, the display elements 22, 24 and 26 in one row are offset from the display elements 26, 24 and 22 in the next row. Although the configurations of display elements 22, 24 and 26 has been explained using pixels 20′, 20″ and 20′″, for simplicity when reference is made to a pixel 20, the pixel 20 could be any one of the pixels 20′, 20″, 20′″ or a pixel having a different configuration of display elements or display elements of different colors.
FIG. 3 depicts one embodiment of a conventional method 50 for processing color and texture data for a particular pixel 20. The color or colors for each fragment intersecting the pixel 20 is sampled at a particular point in the pixel 20, via step 52. Typically, the color for each fragment is sampled at the center of the pixel 20. This sampling at a particular point typically results in a red value, a green value and a blue value for each fragment intersecting the pixel. Thus, a color value for each display element 22, 24 or 26 is typically obtained through a single sampling of the fragment at a single point in the corresponding pixel. The color values for each fragment are processed for the pixel, via step 54. Step 54 often includes interpolating the color values to provide new, interpolated color values.
Texture data for each fragment is also processed, via step 56. As discussed above, typically the texture data for each fragment can be considered to be an additional color to be displayed. In order to perform step 56, the texture or textures are obtained from a single sample point, typically at the same point from which color is sampled. Step 56 also typically includes providing texture data of the appropriate resolution using MIP map levels to account for an object's distance from the viewing plane. The color and texture data are then displayed, via step 58. Typically, step 58 includes combining the texture and color data. For example, step 58 typically includes combining the interpolated red, green and blue values with the corresponding texture values. Step 58 would also include displaying these combined values in the red display element 22, the green display element 24 and the blue display element 26, respectively. The method 50 can be repeated for each of the pixels 20 in the display 10. Consequently, a graphical image can be provided.
Although the conventional method 50 functions, one of ordinary skill in the art will readily realize that each of the pixels 20 and thus each of the display elements 22, 24 and 26 has a physical size and location. In other words, each of the display elements 22, 24 and 26 has physical dimensions and is generally offset from the center of the pixel 20. Thus, even if red, green and blue are displayed using the display elements 22, 24, and 26, the pixel 20 is not a uniform color. For example, for the pixel 20′, the left edge of the pixel 20′ will appear more red, while the right edge of the pixel 20′ will appear more blue because of the size an location of the display elements 22 and 26, respectively. This effect is known as color bleeding.
For example, assume the display 10 is to appear completely white and that the display 10 includes pixels 20′ having display elements 22, 24 and 26 in the configuration shown in FIG. 2A. Also assume that the conventional method 50 is utilized to display the white screen. Thus, the red, green and blue color values are obtained as if each of the display elements 22, 24 and 26 were in the center of the pixel 20′ and filled the pixel 20′. However, when actually displayed, the display elements 22, 24 and 26 are offset. As a result, the left edge of the display 10 will appear reddish, while the right edge of the display 10 will appear bluish. Although this effect might be mitigated by using another configuration of display elements 22, 24 and 26, color bleeding will still occur. For example, if the configuration of display elements 22, 24 and 26 depicted in FIG. 2B is used in conjunction with the method 50, the top and bottom edges of the display 10 may be red and green, respectively. Similarly, if the configuration of display elements 22, 24 and 26 depicted in FIG. 2C is used in conjunction with the method 50, the left and right edges of the display 10 may be purple.
The color bleeding effect is even more noticeable for devices that use smaller displays 10. For example, many portable devices such as portable gaming devices, employ smaller displays 10. Consequently, each pixel 20 occupies a larger fraction of the display 10. The color bleeding described above becomes more noticeable to users for smaller devices having smaller displays 10.
Accordingly, what is needed is a system and method for reducing color bleeding, thereby improving color quality on a display. The present invention addresses such a need.